
package com.electric.electric.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.electric.electric.POJO.Entity.DeviceModel;
import com.electric.electric.POJO.VO.DeviceModelVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DeviceModelMapper extends BaseMapper<DeviceModel> {

    List<DeviceModel> selectList();

    @Select("SELECT dm.model_name, dm.initial_value FROM device_model dm WHERE dm.id = #{id}")
    DeviceModelVO deviceModelToDeviceModelVO(Long id);
}